package com.scientificInfo.dao;


import com.scientificInfo.bean.Works;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface WorksMapper {

    @Select("select* from works")
    List<Works> queryAll();

    @Select("select* from works where resultUUid = #{resultUUid}")
    Works selectByPrimaryKey(String resultUUid);

    @Update("update works set checkflag = #{checkflag} where resultUUid = #{resultuuid} ")
    int updateByPrimaryKey(@Param("resultuuid") String resultuuid, @Param("checkflag") int checkflag);

    @Insert("insert into works(resultUUid, teacherId, worksname, workspress, worksdate, editor)values(#{works.resultuuid}, #{works.teacherId}, #{works.worksname}, #{works.workspress}, #{works.worksdate}, #{works.editor})")
    int insert(@Param("works")Works works);
}